package com.colorfruit.admin.business.service.impl;

import com.colorfruit.admin.business.dao.FoundationSysUserMapper;
import com.colorfruit.admin.business.service.UserService;
import com.colorfruit.admin.pojo.entity.FoundationSysUser;
import com.colorfruit.framework.model.pojo.BaseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
@Transactional
public class UserServiceImpl implements UserService {

    @Autowired
    FoundationSysUserMapper foundationSysUserMapper;

    @Override
    public BaseResult getUserInfo(String userId) {
        log.info("[service] [IN] getUserInfo param : userId = {} ", userId );
        FoundationSysUser foundationSysUser = foundationSysUserMapper.selectByPrimaryKey(userId);
        log.info("[service] [OUT] getUserInfo success,  ");
        return new BaseResult(foundationSysUser);
    }
}
